home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Hyper / Q-R / ResourceLibrarian.sit / ResourceLibrarian / ResourceLibrarian / background_2653.txt < prev    next >
Encoding:
Text File  |  1990-12-13  |  8.0 KB  |  345 lines

  1. -- background: 2653 from stack: in
  2. -- bmap block id: 2469
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openBkgnd
  8.   set visible of bkgnd button "OK" to false
  9. end openBkgnd
  10.  
  11. on openCard
  12.   get name of prev card
  13.   delete first word of it
  14.   delete first char of it
  15.   delete last char of it
  16.   put it into bkgnd field prvCard
  17.   get name of next card
  18.   delete first word of it
  19.   delete first char of it
  20.   delete last char of it
  21.   put it into bkgnd field nxtCard
  22. end openCard
  23.  
  24.  
  25.  
  26. -- part 2 (button)
  27. -- low flags: 00
  28. -- high flags: 2000
  29. -- rect: left=273 top=306 right=337 bottom=307
  30. -- title width / last selected line: 0
  31. -- icon id / first selected line: 27009 / 27009
  32. -- text alignment: 1
  33. -- font id: 0
  34. -- text size: 12
  35. -- style flags: 0
  36. -- line height: 16
  37. -- part name: Next
  38. ----- HyperTalk script -----
  39. on mouseUp
  40.   visual effect Scroll Left
  41.   go to next card
  42.   put empty into bkgnd field result
  43. end mouseUp
  44.  
  45.  
  46.  
  47. -- part 3 (button)
  48. -- low flags: 00
  49. -- high flags: 2000
  50. -- rect: left=204 top=306 right=337 bottom=238
  51. -- title width / last selected line: 0
  52. -- icon id / first selected line: 9301 / 9301
  53. -- text alignment: 1
  54. -- font id: 0
  55. -- text size: 12
  56. -- style flags: 0
  57. -- line height: 16
  58. -- part name: Previous
  59. ----- HyperTalk script -----
  60. on mouseUp
  61.   visual effect scroll right
  62.   go to prev card
  63.   put empty into bkgnd field result
  64. end mouseUp
  65.  
  66.  
  67.  
  68. -- part 7 (button)
  69. -- low flags: 00
  70. -- high flags: A003
  71. -- rect: left=115 top=115 right=137 bottom=294
  72. -- title width / last selected line: 0
  73. -- icon id / first selected line: 0 / 0
  74. -- text alignment: 1
  75. -- font id: 0
  76. -- text size: 12
  77. -- style flags: 0
  78. -- line height: 16
  79. -- part name: Copy Resource TO a Stack
  80. ----- HyperTalk script -----
  81. on mouseUp
  82.   -- set up the resource name and type
  83.   put bkgnd field name into resName
  84.   put bkgnd field type into resType
  85.  
  86.   -- set up the source stack name
  87.   put the long name of this stack into sourceStack
  88.   delete first word of sourceStack
  89.   delete first character of sourceStack
  90.   delete last character of sourceStack
  91.  
  92.   -- get the name of the stack to copy the XCMD/XFCN from
  93.   put fileName("STAK") into destStack
  94.   if destStack = empty then exit mouseUp
  95.  
  96.   -- check to make sure
  97.   put "OK to copy the " & resType into sure
  98.   put " " & resName after sure
  99.   put "?" after sure
  100.   answer sure with "Yes" or "No"
  101.   if it is "No" then exit mouseUp
  102.  
  103.   -- do the actual copying
  104.   ResCopy sourceStack,destStack,resType,resName
  105.  
  106.   -- do result handling
  107.   get the result
  108.   put "Serious problem - the resource was not copied" into outCome
  109.   if it is "ERR2" then put "Source file couldn't be opened." into outCome
  110.   if it is "ERR4" then put "The resource to be copied wasn't found in the source file." into outCome
  111.   if it is "OK1" then put "The resource was copied successfully." into outCome
  112.   if it is "OK3" then put "An existing resource was replaced by the copied one." into outCome
  113.   put outcome into bkgnd field result
  114.  
  115.   -- patch
  116.   push card
  117.   set lockScreen to true
  118.   go home
  119.   doMenu "Back"
  120.   pop card
  121. end mouseUp
  122.  
  123.  
  124. -- part 8 (field)
  125. -- low flags: 00
  126. -- high flags: 0000
  127. -- rect: left=56 top=29 right=48 bottom=197
  128. -- title width / last selected line: 0
  129. -- icon id / first selected line: 0 / 0
  130. -- text alignment: 0
  131. -- font id: 2
  132. -- text size: 12
  133. -- style flags: 0
  134. -- line height: 16
  135. -- part name: name
  136.  
  137.  
  138. -- part 9 (field)
  139. -- low flags: 00
  140. -- high flags: 0000
  141. -- rect: left=240 top=29 right=48 bottom=299
  142. -- title width / last selected line: 0
  143. -- icon id / first selected line: 0 / 0
  144. -- text alignment: 0
  145. -- font id: 2
  146. -- text size: 12
  147. -- style flags: 0
  148. -- line height: 16
  149. -- part name: type
  150.  
  151.  
  152. -- part 10 (button)
  153. -- low flags: 00
  154. -- high flags: A003
  155. -- rect: left=306 top=115 right=137 bottom=507
  156. -- title width / last selected line: 0
  157. -- icon id / first selected line: 0 / 0
  158. -- text alignment: 1
  159. -- font id: 0
  160. -- text size: 12
  161. -- style flags: 0
  162. -- line height: 16
  163. -- part name: Get A New Resource
  164. ----- HyperTalk script -----
  165. on mouseUp
  166.   -- init globals
  167.   global resType, resName
  168.  
  169.   -- get the name of the resource and it's type
  170.   doMenu "New Card"
  171.   put "Please enter the name of the resource and it's type.  Click OK when you're done." into bkgnd field result
  172.   set visible of bkgnd button "OK" to true
  173.   get the location of bkgnd field name
  174.   click at it
  175. end mouseUp
  176.  
  177.  
  178.  
  179. -- part 16 (field)
  180. -- low flags: 00
  181. -- high flags: 2002
  182. -- rect: left=4 top=171 right=305 bottom=507
  183. -- title width / last selected line: 0
  184. -- icon id / first selected line: 0 / 0
  185. -- text alignment: 0
  186. -- font id: 2
  187. -- text size: 12
  188. -- style flags: 0
  189. -- line height: 16
  190. -- part name: comments
  191.  
  192.  
  193. -- part 15 (field)
  194. -- low flags: 01
  195. -- high flags: 0002
  196. -- rect: left=3 top=57 right=85 bottom=509
  197. -- title width / last selected line: 0
  198. -- icon id / first selected line: 0 / 0
  199. -- text alignment: 0
  200. -- font id: 2
  201. -- text size: 12
  202. -- style flags: 0
  203. -- line height: 23
  204. -- part name: result
  205.  
  206.  
  207. -- part 17 (button)
  208. -- low flags: 80
  209. -- high flags: A003
  210. -- rect: left=352 top=90 right=112 bottom=452
  211. -- title width / last selected line: 0
  212. -- icon id / first selected line: 0 / 0
  213. -- text alignment: 1
  214. -- font id: 0
  215. -- text size: 12
  216. -- style flags: 0
  217. -- line height: 16
  218. -- part name: OK
  219. ----- HyperTalk script -----
  220. on mouseUp
  221.   -- get the name of the stack to copy the XCMD/XFCN from.
  222.   put FileName(STAK) into sourceStack
  223.   if sourceStack = empty then exit mouseUp
  224.  
  225.   -- set up the destination stack name, resName, resType
  226.   put the long name of this stack into destStack
  227.   delete first word of destStack
  228.   delete first character of destStack
  229.   delete last character of destStack
  230.   put bkgnd field name into resName
  231.   put bkgnd field type into resType
  232.  
  233.   -- do the actual copying
  234.   ResCopy sourceStack,destStack,resType,resName
  235.  
  236.   -- do result handling
  237.   get the result
  238.   put "Serious problem - the resource was not copied" into outCome
  239.   if it is "ERR2" then
  240.     put "Source file couldn't be opened." into outcome
  241.   end if
  242.   if it is "ERR4" then
  243.     put "The resource to be copied wasn't found in the source file." into outcome
  244.   end if
  245.   if it is "OK1" then
  246.     put "The resource was copied successfully." into outcome
  247.   end if
  248.   if it is "OK3" then
  249.     put "An existing resource was replaced by the copied one." into outcome
  250.   end if
  251.   put outcome into bkgnd field result
  252.  
  253.   -- turn off ok button
  254.   set the visible of bkgnd button "OK" to false
  255.  
  256.   -- name the card for button labels
  257.   get bkgnd field name
  258.   set the name of this card to it
  259.  
  260.   -- patch
  261.   push card
  262.   set lockScreen to true
  263.   go home
  264.   doMenu "Back"
  265.   pop card
  266. end mouseUp
  267.  
  268.  
  269.  
  270. -- part 19 (button)
  271. -- low flags: 00
  272. -- high flags: A003
  273. -- rect: left=4 top=115 right=137 bottom=104
  274. -- title width / last selected line: 0
  275. -- icon id / first selected line: 0 / 0
  276. -- text alignment: 1
  277. -- font id: 0
  278. -- text size: 12
  279. -- style flags: 0
  280. -- line height: 16
  281. -- part name: Sort
  282. ----- HyperTalk script -----
  283. on mouseUp
  284.   push card
  285.   answer "Sort all cards of this stack according to:" with "Name" or "Type" or "Cancel"
  286.   if it is "Name" then sort by bkgnd field "Name"
  287.   if it is "Type" then sort by bkgnd field "Type"
  288.   pop card
  289.   doMenu "Compact Stack"
  290. end mouseUp
  291.  
  292.  
  293. -- part 20 (button)
  294. -- low flags: 00
  295. -- high flags: 8002
  296. -- rect: left=4 top=148 right=170 bottom=104
  297. -- title width / last selected line: 0
  298. -- icon id / first selected line: 0 / 0
  299. -- text alignment: 1
  300. -- font id: 0
  301. -- text size: 12
  302. -- style flags: 0
  303. -- line height: 16
  304. -- part name: Comments
  305.  
  306.  
  307. -- part 22 (field)
  308. -- low flags: 01
  309. -- high flags: 0002
  310. -- rect: left=57 top=312 right=332 bottom=207
  311. -- title width / last selected line: 0
  312. -- icon id / first selected line: 0 / 0
  313. -- text alignment: 65535
  314. -- font id: 2
  315. -- text size: 14
  316. -- style flags: 0
  317. -- line height: 18
  318. -- part name: prvCard
  319. ----- HyperTalk script -----
  320. on mouseUp
  321.   get location of bkgnd button previous
  322.   click at it
  323. end mouseUp
  324.  
  325.  
  326.  
  327. -- part 23 (field)
  328. -- low flags: 01
  329. -- high flags: 0002
  330. -- rect: left=308 top=312 right=332 bottom=458
  331. -- title width / last selected line: 0
  332. -- icon id / first selected line: 0 / 0
  333. -- text alignment: 0
  334. -- font id: 2
  335. -- text size: 14
  336. -- style flags: 0
  337. -- line height: 18
  338. -- part name: nxtCard
  339. ----- HyperTalk script -----
  340. on mouseUp
  341.   get location of bkgnd button next
  342.   click at it
  343. end mouseUp
  344.  
  345.